package com.icepuppet.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;

@RestController
public class HobbyController {
    //数组参数
    @RequestMapping("/arrayParam")
    public String arrayParam(String[] hobby){
        System.out.println(Arrays.toString(hobby));
        return "OK";
    }

    //集合参数
    @RequestMapping("/listParam")
    public String listParam(@RequestParam ArrayList<String> hobby){
        System.out.println(hobby);
        return "OK";
    }
}
